IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[Package]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
   DROP TABLE [dbo].[Package]
GO

CREATE TABLE [dbo].[Package](
	[ID] [bigint] IDENTITY(1,1) NOT NULL,
	[Name] [varchar](50) NOT NULL,
	[Price] [money] NOT NULL
) ON [PRIMARY]

GO

GRANT SELECT,INSERT,DELETE,UPDATE ON dbo.Package TO hms_usr
GO



IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id =
object_id(N'dbo.SP_GetPackage') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
   DROP PROCEDURE dbo.SP_GetPackage
GO

/*----------------------------------------------------------------------
'Created By : Swati
'Created On : 10/11/2008
'SP Name    : dbo.SP_GetPackage
'Used In    : 
'------------------------------------------------------------------------
'Modification Log  
'------------------------------------------------------------------------
'Created By        Modified By         Remarks                             
'-----------       ------------        ----------------------------------
'                                                                          
'----------------------------------------------------------------------*/

CREATE PROCEDURE [dbo].[SP_GetPackage]
AS
	SELECT
	   [Name],
	   Price
   FROM Package

GRANT EXEC ON dbo.SP_GetPackage TO hms_usr
GO

